# Contributor: Thomas Boerger <thomas@webhippie.de>
# Maintainer: omni <omni+alpine@hack.org>
pkgname=py3-pymysql
_pyname=PyMySQL
pkgver=1.1.0
pkgrel=0
pkgdesc="Pure Python MySQL Client"
url="https://pypi.org/project/PyMySQL"
arch="noarch"
license="MIT"
options="!check" #require mysql for tests
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

replaces="py-pymysql" # Backwards  compatibility
provides="py-pymysql=$pkgver-r$pkgrel" # Backwards  compatibility

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
51dddc92e766183ab5d93717121d853415561dc81abc7ec8299a73610cae5bc22b6070006d6ea24405ab31bc1ea68be61466a3477c0f84d47435f78ffc60d31e  py3-pymysql-1.1.0.tar.gz
"
